package com.twu.biblioteca;

/**
 * Created by theyes on 17/01/2014.
 */
public class Movie extends LibraryItem{

    public String name;
    public int year;
    public String director;
    public int rating;

    public Movie(String Name, int Year, String Director, int Rating, int q) {
        super(q);

        name = Name;
        year = Year;
        director = Director;
        rating = Rating;

    }

    public Movie(String Name, int Year, String Director,  int q) {
        super(q);
        name = Name;
        year = Year;
        director = Director;
        rating = -1;

    }


    @Override
    public String toString() {


        if(rating != -1)
        {
        return "Movie{" +
                "name='" + name + '\'' +
                ", year=" + year +
                ", director='" + director + '\'' +
                ", rating=" + rating +
                ", quantity=" + quantity +
                '}';
        }
        else
        {
            return "Movie{" +
                    "name='" + name + '\'' +
                    ", year=" + year +
                    ", director='" + director + '\'' +
                    ", rating=" + " No rating given" +
                    ", quantity=" + quantity +
                    '}';
        }
    }
}
